//
//  FirstViewController.m
//  UITestDemo
//
//  Created by Qianfeng on 15/8/14.
//  Copyright (c) 2015年 Qianfeng. All rights reserved.
//

#import "FirstViewController.h"

@interface FirstViewController ()

@end
extern float size;
@implementation FirstViewController
-(void)viewWillAppear:(BOOL)animated
{
    self.title = @"第一页";
}
- (void)viewDidLoad {
    [super viewDidLoad];
    //self.view.backgroundColor = [UIColor redColor];
    self.title = @"第一页";
    [self initUI];
}
-(void)initUI
{
    
    [self addSlider];
}
-(void)addSlider
{
    _slider = [[UISlider alloc]initWithFrame:CGRectMake(20, 100, self.view.frame.size.width-40, 20)];
    _slider.minimumValue = 0 ;
    _slider.maximumValue = 10;
    [self.view addSubview:_slider];
    size = _slider.value;
    
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(20, 130, 40, 40)];
    label.text = @"0";
    [self.view addSubview:label];
    
    UILabel *label2 = [[UILabel alloc]initWithFrame:CGRectMake(self.view.frame.size.width-60, 130, 40, 40)];
    label2.text = @"10";
    label2.textAlignment = NSTextAlignmentRight;
    [self.view addSubview:label2];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
